package com.imooc.distributedemo.resume.thread;

public class MyThread implements Runnable {

    private String flag;

    public MyThread(String flag) {
        this.flag = flag;
    }

    @Override
    public void run() {
        StringBuilder stringBuilder = new StringBuilder();
        String threadName = Thread.currentThread().getName();
        String word = stringBuilder.append(threadName).append(" is running").append(flag).toString();
        System.out.println(word);
    }
}
